home *** CD-ROM | disk | FTP | other *** search
- /* Install a shared library */
-
- #include <osbind.h>
- #include <bios.h>
- #include <basepage.h>
- #include "libs.h"
-
- typedef void (*vproc)();
-
-
- /* Install this calling program as a shared library */
-
- void
- InstallLibrary (lib,keep)
- LibLink *lib; /* IN link structure for the library to install */
- long keep; /* IN amount of memory to keep for library */
- {
- extern int end[];
- register vproc add_lib;
-
- if (add_lib = (vproc)Setexc(LIB_ADD_VECTOR,-1L))
- {
- (*add_lib)(lib);
- Ptermres(keep+(long)end-(long)BP,0);
- }
- }
-